/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dusin.teachassistdbservice.dao;


import java.util.List;
import java.util.Map;

/**
 *
 * @author tengyu
 */
public interface JobDao {    
    
    boolean doCreate(Object[] bean);
    boolean doDeleteByID(int id);
    boolean doUpdate(Object[] bean);
    public boolean doChangeStatus(int id,int status);
    public boolean doSubmitReport(Object[] bean);
    
    Map<String,Object> findByNo(String no);
    List<Map<String,Object>> findAll();
    List<Map<String,Object>> findAll(int start,int size);    
    List<Map<String,Object>> findAllByTeachClassId(int teachClassId,int type);
    public List<Map<String, Object>> findAllByTeachClassId(int teachClassId);
    public List<Map<String,Object>> findAllCourseJobs4Student(int teachClassId,String studentNo);
    
    public boolean isScoreExisted(int jobId,String studentNo);
    public boolean doCancelReport(int jobId,String studentNo);
    public boolean doUpdateReport(int jobId,String studentNo,int score,
            int status,String note,String filename,double degree,String matchFilename);
    public boolean doSetScore(int jobId,String studentNo,int score,String note);
    public boolean doSetStatus(int jobId,String studentNo,int status);

    public List<Map<String, Object>> findHomeworkDetail(int teachClassId, int jobId);

    public int[] doUpdateScoreBatch(List<Object[]> recToBeUpdated);

    public boolean doCreateDetailBatch(List<Object[]> recToBeCreated);

    public List<Map<String, Object>> findAllJobDetail(int teachClassId);
            
}
